package com.summer.data.table.column;

import com.summer.data.table.BaseColumn;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author 345480567@qq.com
 */
public class BoolColumn extends BaseColumn<Boolean> {

    public BoolColumn(String name) {
        super(name);
    }

    @Override
    public void fetchNotNullValue(ResultSet resultSet, Integer index) throws SQLException {
        value = getValue(resultSet, index);
    }

    public static Boolean getValue(ResultSet resultSet, Integer index) throws SQLException {
        return resultSet.getBoolean(index);
    }
}
